/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package gui.benhan;

import com.toedter.calendar.JDateChooser;
import gui.event.benhan.PDTFull_evt;
import javax.swing.JTextField;


/**
 *
 * @author Admin
 */
public class PDT_Full extends javax.swing.JDialog {

    /**
     * Creates new form PDT_Dialog
     */
    public PDT_Full(java.awt.Frame parent, boolean modal) {
        super(parent, modal);
        initComponents();
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        pnlThongTinPhieuDieuTri = new javax.swing.JPanel();
        lbmaPhieudieuTri = new javax.swing.JLabel();
        txtMaPhieuDieuTri = new javax.swing.JTextField();
        lbNgayDieuTri = new javax.swing.JLabel();
        lbNgayTaiKham = new javax.swing.JLabel();
        lbTongChiPhi = new javax.swing.JLabel();
        txtTongChiPhi = new javax.swing.JTextField();
        btnLietKe = new javax.swing.JButton();
        jDateChooserNgayTiem1 = new com.toedter.calendar.JDateChooser();
        jDateChooseNgaytaiKham = new com.toedter.calendar.JDateChooser();
        pnlChitietPhieuDieuTri = new javax.swing.JPanel();
        btnThem = new javax.swing.JButton();
        btnSua = new javax.swing.JButton();
        btnClose = new javax.swing.JButton();
        jScrollPane1 = new javax.swing.JScrollPane();
        btlChiTietPhieuDieuTri = new javax.swing.JTable();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle("Thông Tin Phiếu Điều Trị");

        pnlThongTinPhieuDieuTri.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Thông tin phiếu điều trị", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, null, new java.awt.Color(0, 0, 204)));

        lbmaPhieudieuTri.setText("Mã phiếu điều trị");

        lbNgayDieuTri.setText("Ngày điều trị");

        lbNgayTaiKham.setText("Ngày tái khám");

        lbTongChiPhi.setText("Tổng chỉ phí");

        btnLietKe.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/images/ultility/Filter-Standard-16.png"))); // NOI18N
        btnLietKe.setText("Liệt kê");
        btnLietKe.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnLietKeActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout pnlThongTinPhieuDieuTriLayout = new javax.swing.GroupLayout(pnlThongTinPhieuDieuTri);
        pnlThongTinPhieuDieuTri.setLayout(pnlThongTinPhieuDieuTriLayout);
        pnlThongTinPhieuDieuTriLayout.setHorizontalGroup(
            pnlThongTinPhieuDieuTriLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlThongTinPhieuDieuTriLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlThongTinPhieuDieuTriLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lbmaPhieudieuTri)
                    .addComponent(lbNgayDieuTri))
                .addGap(18, 18, 18)
                .addGroup(pnlThongTinPhieuDieuTriLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(txtMaPhieuDieuTri)
                    .addComponent(jDateChooserNgayTiem1, javax.swing.GroupLayout.DEFAULT_SIZE, 128, Short.MAX_VALUE))
                .addGap(147, 147, 147)
                .addGroup(pnlThongTinPhieuDieuTriLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(lbNgayTaiKham)
                    .addComponent(lbTongChiPhi))
                .addGap(18, 18, 18)
                .addGroup(pnlThongTinPhieuDieuTriLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(txtTongChiPhi, javax.swing.GroupLayout.DEFAULT_SIZE, 130, Short.MAX_VALUE)
                    .addComponent(btnLietKe, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jDateChooseNgaytaiKham, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        pnlThongTinPhieuDieuTriLayout.setVerticalGroup(
            pnlThongTinPhieuDieuTriLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlThongTinPhieuDieuTriLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlThongTinPhieuDieuTriLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlThongTinPhieuDieuTriLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(lbmaPhieudieuTri)
                        .addComponent(txtMaPhieuDieuTri, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(lbNgayTaiKham))
                    .addComponent(jDateChooseNgaytaiKham, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(pnlThongTinPhieuDieuTriLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlThongTinPhieuDieuTriLayout.createSequentialGroup()
                        .addGroup(pnlThongTinPhieuDieuTriLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(lbNgayDieuTri)
                            .addComponent(lbTongChiPhi)
                            .addComponent(txtTongChiPhi, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, Short.MAX_VALUE)
                        .addComponent(btnLietKe))
                    .addGroup(pnlThongTinPhieuDieuTriLayout.createSequentialGroup()
                        .addComponent(jDateChooserNgayTiem1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(0, 0, Short.MAX_VALUE))))
        );

        pnlChitietPhieuDieuTri.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Chi tiết phiếu điều trị", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, null, new java.awt.Color(0, 0, 204)));

        btnThem.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/images/benhan/Book-Close-16 addnew.png"))); // NOI18N
        btnThem.setText("Thêm");
        btnThem.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnThemActionPerformed(evt);
            }
        });

        btnSua.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/images/benhan/Book-Close-16 edit.png"))); // NOI18N
        btnSua.setText("Sửa");
        btnSua.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSuaActionPerformed(evt);
            }
        });

        btnClose.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/images/ultility/Close-16.png"))); // NOI18N
        btnClose.setText("Đóng");
        btnClose.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnCloseActionPerformed(evt);
            }
        });

        btlChiTietPhieuDieuTri.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {"Trị phong", "1 típ", "2 lần", "50000"},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Tên thuốc", "Số lượng", "Liều dùng", "Tổng chi phí"
            }
        ));
        jScrollPane1.setViewportView(btlChiTietPhieuDieuTri);

        javax.swing.GroupLayout pnlChitietPhieuDieuTriLayout = new javax.swing.GroupLayout(pnlChitietPhieuDieuTri);
        pnlChitietPhieuDieuTri.setLayout(pnlChitietPhieuDieuTriLayout);
        pnlChitietPhieuDieuTriLayout.setHorizontalGroup(
            pnlChitietPhieuDieuTriLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlChitietPhieuDieuTriLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlChitietPhieuDieuTriLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlChitietPhieuDieuTriLayout.createSequentialGroup()
                        .addComponent(btnThem, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(btnSua, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(btnClose, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addContainerGap())
                    .addComponent(jScrollPane1)))
        );
        pnlChitietPhieuDieuTriLayout.setVerticalGroup(
            pnlChitietPhieuDieuTriLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlChitietPhieuDieuTriLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlChitietPhieuDieuTriLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnThem)
                    .addComponent(btnSua)
                    .addComponent(btnClose))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 173, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addComponent(pnlChitietPhieuDieuTri, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(pnlThongTinPhieuDieuTri, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(pnlThongTinPhieuDieuTri, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(pnlChitietPhieuDieuTri, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void btnSuaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSuaActionPerformed
        PDTFull_evt.btnSuaActionPerformed();
    }//GEN-LAST:event_btnSuaActionPerformed

    private void btnCloseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCloseActionPerformed
        PDTFull_evt.btnCloseActionPerformed(this);
    }//GEN-LAST:event_btnCloseActionPerformed

    private void btnThemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnThemActionPerformed
        PDTFull_evt.btnThemActionPerformed();
    }//GEN-LAST:event_btnThemActionPerformed

    private void btnLietKeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnLietKeActionPerformed
        PDTFull_evt.btnLietKeActionPerformed();
    }//GEN-LAST:event_btnLietKeActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(PDT_Full.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(PDT_Full.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(PDT_Full.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(PDT_Full.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the dialog */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                PDT_Full dialog = new PDT_Full(new javax.swing.JFrame(), true);
                dialog.addWindowListener(new java.awt.event.WindowAdapter() {
                    @Override
                    public void windowClosing(java.awt.event.WindowEvent e) {
                        System.exit(0);
                    }
                });
                dialog.setVisible(true);
            }
        });
    }

    public JDateChooser getjDateChooserNgayTiem1() {
        return jDateChooserNgayTiem1;
    }

    public void setjDateChooserNgayTiem1(JDateChooser jDateChooserNgayTiem1) {
        this.jDateChooserNgayTiem1 = jDateChooserNgayTiem1;
    }

    public JTextField getTxtMaPhieuDieuTri() {
        return txtMaPhieuDieuTri;
    }

    public void setTxtMaPhieuDieuTri(JTextField txtMaPhieuDieuTri) {
        this.txtMaPhieuDieuTri = txtMaPhieuDieuTri;
    }

    public JDateChooser getjDateChooseNgaytaiKham() {
        return jDateChooseNgaytaiKham;
    }

    public void setjDateChooseNgaytaiKham(JDateChooser jDateChooseNgaytaiKham) {
        this.jDateChooseNgaytaiKham = jDateChooseNgaytaiKham;
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JTable btlChiTietPhieuDieuTri;
    private javax.swing.JButton btnClose;
    private javax.swing.JButton btnLietKe;
    private javax.swing.JButton btnSua;
    private javax.swing.JButton btnThem;
    private com.toedter.calendar.JDateChooser jDateChooseNgaytaiKham;
    private com.toedter.calendar.JDateChooser jDateChooserNgayTiem1;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JLabel lbNgayDieuTri;
    private javax.swing.JLabel lbNgayTaiKham;
    private javax.swing.JLabel lbTongChiPhi;
    private javax.swing.JLabel lbmaPhieudieuTri;
    private javax.swing.JPanel pnlChitietPhieuDieuTri;
    private javax.swing.JPanel pnlThongTinPhieuDieuTri;
    private javax.swing.JTextField txtMaPhieuDieuTri;
    private javax.swing.JTextField txtTongChiPhi;
    // End of variables declaration//GEN-END:variables
}
